<?php /* Smarty version Smarty3-RC3, created on 2013-10-10 09:56:55
         compiled from ".\templates\bhatthiDetail.tpl" */ ?>
<?php /*%%SmartyHeaderCode:4094525679e800d239-68586893%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ce9ba6f81c32c9b4bb77e234231513f60e62005b' => 
    array (
      0 => '.\\templates\\bhatthiDetail.tpl',
      1 => 1381305260,
    ),
  ),
  'nocache_hash' => '4094525679e800d239-68586893',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_function_html_options')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\function.html_options.php';
if (!is_callable('smarty_function_html_select_date')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\function.html_select_date.php';
if (!is_callable('smarty_modifier_string_format')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\modifier.string_format.php';
if (!is_callable('smarty_modifier_date_format')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\modifier.date_format.php';
?>  <?php if ($_GET['print']!=1){?>
  <?php $_template = new Smarty_Internal_Template("header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php }else{ ?>
  <table width="100%">
    <td width="33.33%"><img src="./images/shreeSava.jpg" /></td>
    <td width="33.33%" align="center"><img src="./images/shreeGanesh.jpg" /></td>
    <td width="33.33%" align="right"><img src="./images/shreeGelMataji.jpg" /></td>
  </table>
<?php }?>
<style>
.aavakColor
{
  color:red;
}
.javakColor
{
  color:green;
}
</style>
<script type="text/javascript">
function deleteRow(bhatthiId)
{
  if(confirm("Warning: Are you sure?\nDeletion is permanent. Continue anyway.") && confirm("Warning: Are you sure?\nDeletion is permanent. Continue anyway."))
  {
    location.href = "deleteBhatthiBook.php?bhatthiId="+bhatthiId;
  }
}
</script>
<script type="text/javascript">
function bookFunction(id)
{ 
  document.form.bdate .value="1";
  document.form.submit();
}
</script>
<form name="form" action="" method="post">
<input type="hidden" name="bdate" id="bdate" value="0" />
<center><b><?php echo $_smarty_tpl->getVariable('l_bhatthiDetail')->value;?>
</b></center>
<div class="contentDiv">
  <table border="0" align="center" width="100%" cellspacing="0" cellpadding="2" >
  <tr>
    <td class="table1">
      <?php echo $_smarty_tpl->getVariable('l_partySelect')->value;?>
 : 
      <select name="party" onchange="bookFunction()">
        <option value="0"><?php echo $_smarty_tpl->getVariable('l_partySelect')->value;?>
</option>
        <?php ob_start();?><?php echo $_smarty_tpl->getVariable('partyId')->value;?>
<?php $_tmp1=ob_get_clean();?><?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->getVariable('party')->value['id'],'output'=>$_smarty_tpl->getVariable('party')->value['name'],'selected'=>$_tmp1),$_smarty_tpl->smarty,$_smarty_tpl);?>

      </select>
    </td>
    <td class="table1">
      <?php echo $_smarty_tpl->getVariable('l_from')->value;?>
 : <?php echo smarty_function_html_select_date(array('prefix'=>"fromDate",'start_year'=>"-2",'end_year'=>"+1",'field_order'=>"DMY",'day_value_format'=>"%02d",'time'=>$_smarty_tpl->getVariable('fromDateSelected')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>

      <?php echo $_smarty_tpl->getVariable('l_to')->value;?>
 : <?php echo smarty_function_html_select_date(array('prefix'=>"toDate",'start_year'=>"-2",'end_year'=>"+1",'field_order'=>"DMY",'day_value_format'=>"%02d",'time'=>$_smarty_tpl->getVariable('toDate')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>

      <input type="submit" name="submitBtn" value="<?php echo $_smarty_tpl->getVariable('l_find')->value;?>
" />
      <?php if ($_GET['print']!=1){?>
        <td class="table1"><a href="bhatthiDetail.php?print=1&fromDate=<?php echo $_smarty_tpl->getVariable('fromDate')->value;?>
&toDate=<?php echo $_smarty_tpl->getVariable('toDate')->value;?>
&party=<?php echo $_smarty_tpl->getVariable('partyId')->value;?>
">Print</a></td>
      <?php }else{ ?>
        &nbsp;
      <?php }?>
    </td>
  </tr>
  <?php if ($_GET['print']!=1){?>
    <?php }else{ ?>
    <tr class="table2"><td colspan="10"><hr COLOR="#000000" /></td></tr>
    <?php }?>
  <tr>
    <th colspan="2" align="center" class="aavakColor"><?php echo $_smarty_tpl->getVariable('l_credit')->value;?>
</th>
  </tr>
  <?php if ($_GET['print']!=1){?>
    <?php }else{ ?>
    <tr class="table2"><td colspan="10"><hr COLOR="#000000" /></td></tr>
    <?php }?>
  <tr align="center">
    <td colspan="2" align="center">
    <table border="1" align="center" width="100%" cellspacing="0" cellpadding="1" class="aavakColor">
      <tr class="table1">
        <th align="left">&nbsp;</th>
        <th><?php echo $_smarty_tpl->getVariable('l_date')->value;?>
</th>
        <th>Particulars</th>
        <th><?php echo $_smarty_tpl->getVariable('l_grossWeight')->value;?>
</th>
        <th>weightPerc</th>
        <th><?php echo $_smarty_tpl->getVariable('l_weight')->value;?>
</th>
        <th><?php echo $_smarty_tpl->getVariable('l_touch')->value;?>
</th>
        <th><?php echo $_smarty_tpl->getVariable('l_fine')->value;?>
</th>
        <th><?php echo $_smarty_tpl->getVariable('l_qty')->value;?>
</th>
        <th><?php echo $_smarty_tpl->getVariable('l_rate')->value;?>
</th>
        <th>Amt</th>
      </tr>
      <tr>
        <td width="8%">&nbsp;</td>
        <td width="8%">&nbsp;</td>
        <td width="25%">Opening</td>
        <td width="7%" align="right" style="border-right:1px solid;">&nbsp;</td>
        <td width="7%" align="right" style="border-right:1px solid;">&nbsp;</td>
        <td width="7%" align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('openingFinalFineCr')->value!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('openingFinalFineCr')->value,"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td width="7%" align="right" style="border-right:1px solid;">&nbsp;</td>
        <td width="7%" align="right" style="border-right:1px solid;">&nbsp;</td>
        <td width="7%" align="right"><?php if ($_smarty_tpl->getVariable('openingFinalAmountCr')->value!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('openingFinalAmountCr')->value,"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td width="7%"> &nbsp;</td>
        <td width="7%">&nbsp;</td>
      </tr>
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['name'] = 'crSec';
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['loop'] = is_array($_loop=count($_smarty_tpl->getVariable('bhatthiBookCr')->value)) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['crSec']['total']);
?>
        <tr>
          <td NOWRAP>
            <?php if ($_GET['print']!=1){?>
              <?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['bhatthiBookId']!=$_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']-1]['bhatthiBookId']){?><a href="bhatthiDetailAavak.php?print=1&bhatthiBookId=<?php echo $_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['bhatthiBookId'];?>
&bhatthiPartyId=<?php echo $_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['bhatthiPartyId'];?>
&bhatthiDate=<?php echo $_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['date'];?>
">Print</a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
              <?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['bhatthiBookId']!=$_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']-1]['bhatthiBookId']){?><a href="javascript:deleteRow(<?php echo $_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['bhatthiBookDetailId'];?>
)"><img src="./images/b_drop.png" border="0" width="15" height="15"></a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
              <?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['bhatthiBookId']!=$_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']-1]['bhatthiBookId']){?><a href="bhatthiCreditEntry.php?bhatthiBookId=<?php echo $_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['bhatthiBookId'];?>
"><img src="./images/b_edit.png" border="0" width="15" height="15"></a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
            <?php }else{ ?>
            <?php }?>
          </td>
          <td NOWRAP align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['date'],"%d-%m-%Y");?>
</td>
          <td NOWRAP><?php echo $_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['particulars'];?>
</td>
          <td align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['grossWeight']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['grossWeight'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['weightPerc']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['weightPerc'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['weight']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['weight'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['touch']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['touch'],"%.2f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['fine']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['fine'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['qty']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['qty'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['rate']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['rate'],"%.2f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px solid;"><?php if ($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['amount']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookCr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['crSec']['index']]['amount'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        </tr>
      <?php endfor; endif; ?>
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['name'] = "sec1";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'] = is_array($_loop=$_smarty_tpl->getVariable('extraBhatthiBookCr')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total']);
?>
      <?php endfor; endif; ?>
   <tr><td colspan="12"><hr COLOR="#000000" /></td></tr>
      <tr class="table1">
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;<?php echo $_smarty_tpl->getVariable('l_total')->value;?>
</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('totalFineCr')->value,"%.0f");?>
</td>
        <td align="right"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['crQty'],"%.0f");?>
</td>
        <td>&nbsp;</td>
        <td align="right"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('totalAmountCr')->value,"%.0f");?>
</td>
      </tr>
    </table>
    </td>
  </tr>
    <?php if ($_GET['print']!=1){?>
    <?php }else{ ?>
    <tr class="table2"><td colspan="10"><hr COLOR="#000000" /></td></tr>
    <?php }?>
  <tr class="table1">
    <th colspan="2" class="javakColor"><?php echo $_smarty_tpl->getVariable('l_debit')->value;?>
</th>
  </tr>
  <?php if ($_GET['print']!=1){?>
    <?php }else{ ?>
    <tr class="table2"><td colspan="10"><hr COLOR="#000000" /></td></tr>
    <?php }?>
  <tr class="">  
    <td vAlign="top" colspan="2">
    <table border="1" align="center" width="100%" cellspacing="0" cellpadding="1"   class="javakColor">
      <tr class="table1">
      	<td>&nbsp;</td>
      	<th><?php echo $_smarty_tpl->getVariable('l_date')->value;?>
</th>
      	<th>Particulars</th>
      	<th><?php echo $_smarty_tpl->getVariable('l_grossWeight')->value;?>
</th>
      	<th>weightPerc</th>
        <th><?php echo $_smarty_tpl->getVariable('l_weight')->value;?>
</th>
        <th><?php echo $_smarty_tpl->getVariable('l_touch')->value;?>
</th>
        <th><?php echo $_smarty_tpl->getVariable('l_fine')->value;?>
</th>
        <th><?php echo $_smarty_tpl->getVariable('l_qty')->value;?>
</th>
        <th><?php echo $_smarty_tpl->getVariable('l_rate')->value;?>
</th>
        <th>Amt</th>
      </tr>
      <tr>
      	<td width="8%">&nbsp;</td>
      	<td width="8%">&nbsp;</td>
      	<td width="25%">Opening</td>
      	<td width="7%">&nbsp;</td>
      	<td width="7%">&nbsp;</td>
      	<td width="7%">&nbsp;</td>
      	<td width="7%">&nbsp;</td>
      	<td width="7%" align="right"><?php if ($_smarty_tpl->getVariable('openingFinalFineDr')->value!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('openingFinalFineDr')->value,"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
      	<td width="7%">&nbsp;</td>
      	<td width="7%">&nbsp;</td>
        <td width="7%" align="right"><?php if ($_smarty_tpl->getVariable('openingFinalAmountDr')->value!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('openingFinalAmountDr')->value,"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
      </tr>
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['name'] = "drSec";
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['loop'] = is_array($_loop=count($_smarty_tpl->getVariable('bhatthiBookDr')->value)) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["drSec"]['total']);
?>
        <tr>
          <td>
            <?php if ($_GET['print']!=1){?>
              <?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['bhatthiBookId']!=$_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']-1]['bhatthiBookId']){?><a href="bhatthiDetailJavak.php?print=1&bhatthiBookId=<?php echo $_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['bhatthiBookId'];?>
&bhatthiPartyId=<?php echo $_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['bhatthiPartyId'];?>
&bhatthiDate=<?php echo $_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['date'];?>
">Print</a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
              <?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['bhatthiBookId']!=$_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']-1]['bhatthiBookId']){?><a href="javascript:deleteRow(<?php echo $_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['bhatthiBookDetailId'];?>
)"><img src="./images/b_drop.png" border="0" width="15" height="15"></a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
              <?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['bhatthiBookId']!=$_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']-1]['bhatthiBookId']){?><a href="bhatthiDebitEntry.php?bhatthiBookId=<?php echo $_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['bhatthiBookId'];?>
"><img src="./images/b_edit.png" border="0" width="15" height="15"></a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
            <?php }else{ ?>
            <?php }?>
          </td>
          <td NOWRAP align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['date'],"%d-%m-%Y");?>
</td>
          <td><?php echo $_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['particulars'];?>
</td>
          <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['grossWeight']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['grossWeight'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['weightPerc']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['weightPerc'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['weight']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['weight'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['touch']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['touch'],"%.2f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['fine']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['fine'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['qty']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['qty'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['rate']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['rate'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
          <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['amount']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bhatthiBookDr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['drSec']['index']]['amount'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        </tr>
      <?php endfor; endif; ?>
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['name'] = "sec1";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'] = is_array($_loop=$_smarty_tpl->getVariable('extraBhatthiBookDr')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total']);
?>
      <?php endfor; endif; ?>
      <tr><td colspan="60"><hr COLOR="#000000" /></td></tr>
      <tr class="table1">
        <td>&nbsp;</td>
        <td>&nbsp;</td>
         <td><?php echo $_smarty_tpl->getVariable('l_total')->value;?>
</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('totalFineDr')->value,"%.0f");?>
</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('totalAmountDr')->value,"%.0f");?>
</td>
      </tr>
    </table>
    </td>

    
    
  </tr>
  <tr>
    <td colspan="2"><b style="color:green"><?php if ($_smarty_tpl->getVariable('total')->value['totFine']>=0){?> Total Debit Fine:<?php }else{ ?></b><b style="color:red"> Total Credit Fine:<?php }?>  <?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['totFine'],"%.0f");?>
 </b><br/>
                    <b style="color:green"><?php if ($_smarty_tpl->getVariable('total')->value['totAmount']>=0){?> Total Debit Amount:<?php }else{ ?></b><b style="color:red"> Total Credit Amount:<?php }?>  <?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['totAmount'],"%.0f");?>
</b></td>
  </tr>
  </table>
</div>
</form>
<?php if ($_GET['print']!=1){?>
  <?php $_template = new Smarty_Internal_Template("footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php }?>
